package com.thinkTank.oa.lucene;

import java.util.List;

import org.apache.solr.client.solrj.beans.Field;

/***
 * 需求检索类
 * @date 2018-09-19
 * @author dq
 *
 */
public class LuceneDemand {

	@Field
	String demandId;//需求Id
	
	@Field
	String demandNumber;//需求number 
	@Field
	String source;//需求来源
	@Field
	String sourceRemark;//需求来源备注
	@Field
	List<String> demandType;//需求类型
	@Field
	List<String> researchField;//需求领域
	@Field
	String area;//需求地区
	@Field
	String demandName;//需求名称
	@Field
	String demandStatus;//需求状态
	@Field
	String demandContent;//需求内容
	@Field
	String demandContactId;//联系人ID
	@Field
	String demandContactName;//联系人姓名
	
	public LuceneDemand(){};
	
	public LuceneDemand(String demandId,String demandNumber,String source,String sourceRemark,	List<String> demandType,List<String> researchField,String area,String demandName,String demandStatus,String demandContent,String demandContactId,String demandContactName){
		this.demandId =demandId;
		this.demandNumber=demandNumber;
		this.source=source;
		this.sourceRemark=sourceRemark;
		this.demandType=demandType;
		this.researchField=researchField;
		this.area=area;
		this.demandName=demandName;
		this.demandStatus=demandStatus;
		this.demandContent=demandContent;
		this.demandContactId=demandContactId;
		this.demandContactName=demandContactName;
	}
	public static String getFileds(String key){
		if(key==null||key.equals("")){
			return "demand";
		}else if(key.equals("demandId")){
			return "demandId";
		}else if(key.toLowerCase().equals("dn")){
			return "demandNumber";
		}else if(key.toLowerCase().equals("sc")){
			return "source";
		}else if(key.toLowerCase().equals("sr")){
			return "sourceRemark";
		}else if(key.toLowerCase().equals("dt")){
			return "demandType";
		}else if(key.toLowerCase().equals("rf")){
			return "researchField";
		}else if(key.toLowerCase().equals("area")){
			return "area";
		}else if(key.toLowerCase().equals("dn")){
			return "demandName";
		}else if(key.toLowerCase().equals("ds")){
			return "demandStatus";
		}else if(key.toLowerCase().equals("dct")){
			return "demandContent";
		}else if(key.toLowerCase().equals("dci")){
			return "demandContactId";
		}else if(key.toLowerCase().equals("dcn")){
			return "demandContactName";
		}else{
			return "demand";
		}
	}
	public String getDemandId() {
		return demandId;
	}

	public void setDemandId(String demandId) {
		this.demandId = demandId;
	}

	public String getDemandNumber() {
		return demandNumber;
	}

	public void setDemandNumber(String demandNumber) {
		this.demandNumber = demandNumber;
	}

	public String getSource() {
		return source;
	}

	public void setSource(String source) {
		this.source = source;
	}

	public String getSourceRemark() {
		return sourceRemark;
	}

	public void setSourceRemark(String sourceRemark) {
		this.sourceRemark = sourceRemark;
	}

	public List<String> getDemandType() {
		return demandType;
	}

	public void setDemandType(List<String> demandType) {
		this.demandType = demandType;
	}

	public List<String> getResearchField() {
		return researchField;
	}

	public void setResearchField(List<String> researchField) {
		this.researchField = researchField;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public String getDemandName() {
		return demandName;
	}

	public void setDemandName(String demandName) {
		this.demandName = demandName;
	}

	public String getDemandStatus() {
		return demandStatus;
	}

	public void setDemandStatus(String demandStatus) {
		this.demandStatus = demandStatus;
	}

	public String getDemandContent() {
		return demandContent;
	}

	public void setDemandContent(String demandContent) {
		this.demandContent = demandContent;
	}

	public String getDemandContactId() {
		return demandContactId;
	}

	public void setDemandContactId(String demandContactId) {
		this.demandContactId = demandContactId;
	}

	public String getDemandContactName() {
		return demandContactName;
	}

	public void setDemandContactName(String demandContactName) {
		this.demandContactName = demandContactName;
	}
	
}
